/*
 * @Author: zhangyun
 * @Date: 2021-04-26 09:31:55
 * @LastEditors: zhangyun
 * @LastEditTime: 2021-04-26 11:29:46
 * @Desc:
 */
const mongoose = require('mongoose')

mongoose.connect(
  'mongodb://localhost:27017/chehu',
  {
    useNewUrlParser: true,
    useUnifiedTopology: true,
  },
  function (err) {
    if (err) {
      console.log('数据库连接失败')
    } else {
      console.log('数据库连接成功')
    }
  }
)
//导出
module.exports = mongoose
